<?php
namespace app\mobile\controller;
use think\facade\Cache;
use think\facade\Cookie;
use think\facade\Session;
use app\common\variable\MsgCode;
use app\common\controller\SpecialTopic as SpecialTopicController;
class SpecialTopic extends Base
{
    public function index()
    {
        $G=request()->get();
        $Data=JobFairController::getList($G);
        if($Data->items()){
            return $this->ajaxReturn('',MsgCode::$success,$Data);
        }else{
            return $this->ajaxReturn('暂无招聘会',MsgCode::$error);
        }
    }
    public function detail($id)
    {
        $D=[
            'id'=>$id,
            'uid'=>Session::get('User.id'),
            'company_id'=>Session::get('User.company_id'),
            'role_type'=>Session::get('User.role_type')
        ];
        $Find=SpecialTopicController::detail($D);
        if($Find){
            return $this->ajaxReturn('',MsgCode::$success,$Find);
        }else{
            return $this->ajaxReturn('暂无招聘会',MsgCode::$error);
        }
    }
    public function addEnroll($id)
    {
        $D=[
            'id'=>$id,
            'uid'=>Session::get('User.id'),
            'company_id'=>Session::get('User.company_id'),
            'role_type'=>Session::get('User.role_type')
        ];
        return SpecialTopicController::addEnroll($D);
    }
}
